package manager;

import java.util.List;

import model.Additional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import idao.IAdditionalDAO;
import imanager.IAdditionalManager;

@Service
public class AdditionalManager implements IAdditionalManager {

	@Autowired
	private IAdditionalDAO additionalDAO;

	public IAdditionalDAO getAdditionalDAO() {
		return additionalDAO;
	}

	public void setAdditionalDAO(IAdditionalDAO additionalDAO) {
		this.additionalDAO = additionalDAO;
	}

	public AdditionalManager() {
		// TODO Auto-generated constructor stub
	}

	public AdditionalManager(IAdditionalDAO additionalDAO) {
		this.additionalDAO = additionalDAO;
	}

	@Transactional
	public boolean insert(Additional additional) {
		// TODO Auto-generated method stub
		return additionalDAO.insert(additional);
	}

	@Transactional
	public boolean update(Additional additional) {
		// TODO Auto-generated method stub
		return additionalDAO.update(additional);
	}

	@Transactional
	public boolean delete(Additional additional) {
		// TODO Auto-generated method stub
		return additionalDAO.delete(additional);
	}

	@Transactional
	public Additional getBrandByID(int id) {
		// TODO Auto-generated method stub
		return additionalDAO.getAdditionalByID(id);
	}

	@Transactional
	public List<Additional> getAll() {
		// TODO Auto-generated method stub
		return additionalDAO.getAll();
	}

}
